package javabean.MerchantInfo;

import cn.hutool.core.annotation.Alias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@ApiModel(description = "斗拱e账户功能配置")
public class ElecAcctConfig {

    @Alias("switch_state")
    @ApiModelProperty(value = "电子账户开关【电子账户开通总开关；0:关闭 1:开通；示例值：1】", required = true)
    @NotBlank(message = "switchState不能为空")
    @Length(min = 1, max = 1, message = "switchState 长度范围：1~1")
    private String switchState;

    @Alias("acct_type")
    @ApiModelProperty(value = "账户类型【01：中信e管家；示例值：01】", required = true)
    @NotBlank(message = "acctType不能为空")
    @Length(min = 1, max = 2, message = "acctType 长度范围：1~2")
    private String acctType;

    @Alias("cash_fee_party")
    @ApiModelProperty(value = "电子账户取现手续费承担方【1:总部 2:其他；示例值：1】", required = true)
    @NotBlank(message = "cashFeeParty不能为空")
    @Length(min = 1, max = 1, message = "cashFeeParty 长度范围：1~1")
    private String cashFeeParty;

    @Alias("scene")
    @ApiModelProperty(value = "场景类型【必填；与角色类型关联，中信定义的资金类型；示例值：001】", required = true)
    @NotBlank(message = "scene不能为空")
    @Length(min = 1, max = 3, message = "scene 长度范围：1~3")
    private String scene;

    @Alias("role_type")
    @ApiModelProperty(value = "角色类型【必填；与场景关联，中信定义的角色类型；示例值：001001】", required = true)
    @NotBlank(message = "roleType不能为空")
    @Length(min = 1, max = 6, message = "roleType 长度范围：1~6")
    private String roleType;

    @Alias("elec_card_list")
    @ApiModelProperty(value = "银行卡信息【如果开通斗拱E账户但不提供绑卡信息将无法取现，后续绑卡请调用电子账户绑卡接口】", required = false)
    @Valid
    private List<ElecCardList> elecCardList;

}